package com.admin.controller;

import com.admin.service.MenuResourseService;
import com.fegin.bean.common.ztree.ZtreeBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * @author 张子艺
 * @packge com.currency.admin.controller
 * @data 2019-01-16 10:15
 * @project currencycloud
 */
@Controller
@RequestMapping("/admin/menu")
public class MenuController {
    @Autowired
    MenuResourseService menuResourseService;

    @RequestMapping(value = "/findMenuZtree")
    @ResponseBody
    public List<ZtreeBean> findMenuZtree() {
        return menuResourseService.findMenuZtree();
    }

    @RequestMapping(value = "/findMenuZtreeByPeople")
    @ResponseBody
    public List<ZtreeBean> findMenuZtreeByPeople(@RequestParam("loginId")Long loginId) {
        return menuResourseService.findMenuZtreeByPeople(loginId);
    }

}
